﻿using Hotel_Project.Tools.MySqlData_Helps;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Reflection;
using System.Text;
using System.Threading.Tasks;
using System.Windows.Forms;

namespace Hotel_Project.BIZ
{
    public class Vip_Form_Jjh
    {
        //增加按钮
        public void Vip_Form_AddButtom (params string[] str)
        {
            try
            {
                Dao_MySql_Jjh.Execut($"insert into urse_vip values({Convert.ToInt32(str[0])},'{str[1]}','{str[2]}','{str[3]}',{str[4]},'{str[5]}','{str[6]}','{str[7]}','{str[8]}','{str[9]}','{str[10]}',{str[11]},'{str[12]}','{str[13]}',{Convert.ToDouble(str[14])},{Convert.ToDouble(str[15])},{Convert.ToInt32(str[16])},{Convert.ToInt32(str[17])})");
            }
            catch (Exception ex)
            {
                if (ex.HResult == -2146233033)
                {
                    MessageBox.Show("增加重复");
                }
                MessageBox.Show("" + ex.HResult);
            }
        }
        //删除按钮
        public void Vip_Form_DelButtom (int index){
            try
            {
                Dao_MySql_Jjh.Execut($"delete from urse_vip where Vip_CardId = {index}");
            }
            catch (Exception ex)
            {
                MessageBox.Show("" + ex.HResult);
            }
        }
        //保存按钮
        public void Vip_Form_SaveButtom (){ 
        
        }
    }
}
